/**
 * 文件描述：班级服务接口实现类
 * 创建人： SPGLP55
 * 创建时间：2024/11/4
 * 最后编辑人：SPGLP55
 * 最后编辑时间：2024/11/4
 * 文件版本：1
 */

package com.gxuwz.lhleavesys.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gxuwz.lhleavesys.dao.ClassesDao;
import com.gxuwz.lhleavesys.entity.Classes;
import com.gxuwz.lhleavesys.service.ClassesService;

import java.util.List;

@Service
public class ClassesServiceImpl implements ClassesService {

    @Autowired
    private ClassesDao classesDao;

    @Override
    public Classes getClassByClassID(String classID) {
        return classesDao.findByClassID(classID);
    }

    @Override
    public List<Classes> getAllClasses() {
        return classesDao.findAll();
    }

    @Override
    public boolean addClass(Classes classes) {
        return classesDao.insert(classes);
    }

    @Override
    public boolean updateClass(Classes classes, String oldClassID) {
        return classesDao.update(classes, oldClassID);
    }

    @Override
    public boolean deleteClass(String classID) {
        return classesDao.delete(classID);
    }

    @Override
    public boolean findClassesID(String classID) {
        return classesDao.getClassesID(classID);
    }

    @Override
    public List<Classes> BlurQuery(String classID, String className) {
        return classesDao.BlurQuery(classID, className);
    }

    @Override
    public List getAllClassesName() {
        return classesDao.getAllClassesName();
    }

    @Override
    public List<Classes> findMyselfClasses(String collegeID) {
        return classesDao.findMyselfClasses(collegeID);
    }
}
